VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "cCredits"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private C(5) As Long
Public PosY As Long

Private Sub Class_Initialize()
    For i = 0 To UBound(C)
        C(i) = RGB(i * 51, i * 51, i * 51)
    Next i
End Sub

Public Sub Move(Amt As Long)
    PosY = PosY + Amt
End Sub

Public Sub Draw(hDC As Long, SWidth As Long, SHeight As Long)
            If PosY = 0 - (14 * (UBound(Strings) + 1)) Then PosY = SHeight
            
            For i = 0 To UBound(Strings)
                If (i * 14) + PosY < 0 Then
                    n = (i * 14) + PosY
                    n = -Int(n / 2)
                    Select Case n
                        Case 1:
                            SetTextColor hDC, C(5)
                        Case 2:
                            SetTextColor hDC, C(4)
                        Case 3:
                            SetTextColor hDC, C(3)
                        Case 4:
                            SetTextColor hDC, C(2)
                        Case 5:
                            SetTextColor hDC, C(1)
                        Case Else:
                            SetTextColor hDC, C(0)
                    End Select
                ElseIf ((i + 1) * 14) + PosY > SHeight Then
                    n = ((i + 1) * 14) + PosY - SHeight
                    n = Int(n / 2)
                    Select Case n
                        Case 1:
                            SetTextColor hDC, C(5)
                        Case 2:
                            SetTextColor hDC, C(4)
                        Case 3:
                            SetTextColor hDC, C(3)
                        Case 4:
                            SetTextColor hDC, C(2)
                        Case 5:
                            SetTextColor hDC, C(1)
                        Case Else:
                            SetTextColor hDC, C(0)
                    End Select
                Else
                    SetTextColor hDC, C(5)
                End If
                TextOut hDC, SWidth / 2, (i * 14) + PosY, Strings(i), Len(Strings(i))
            Next i
End Sub
